Skip to main content

posixToSlot

posixToSlot( POSIX: `number` | `bigint` ): number
  • POSIX: number | bigint

given a POSIX time returns the equivalent slot number based on the GenesisInfos

if no genesis infos are set the method throws an Error;

you can set the genesis infos using the setGenesisInfos method.